/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.animation.transformations;

import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.api.Generator;
import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.helpergenerators.VisibleGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.transformations.ChangeVisibility;

/**
 *
 * @author Admin
 */
public class ChangeVisibilityGenerator implements Generator{

    @Override
    public boolean canGenerate(Object c) {
        if(c instanceof ChangeVisibility)
            return true;
        else return false;
    }

    @Override
    public void generate(StringBuilder sb, Object o,int recursionLevel,Object original) {
        ChangeVisibility v = (ChangeVisibility)o;
        sb.append(VisibleGenerator.visible+recursionLevel+" => "+
                v.getDestinedVisibility()+" tween Interpolator."+
                v.getInterpolation().getName()+",\n");
    }


}
